package com.ys.vo;

import java.util.List;

public class ResultVo {
    private int code;

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    private String msg;
    private Object obj;

    public static ResultVo success(String mes){
        ResultVo resultVo = new ResultVo();
        resultVo.setCode(2000);
        resultVo.setMsg(mes);
        return resultVo;
    }

    public static ResultVo success(Object obj){
        ResultVo resultVo = new ResultVo();
        resultVo.setCode(2000);
        resultVo.setObj(obj);
        return resultVo;
    }

    public static ResultVo failure(String mes){
        ResultVo resultVo = new ResultVo();
        resultVo.setCode(5000);
        resultVo.setMsg(mes);
        return resultVo;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }


    public Object getObj() {
        return obj;
    }

    public void setObj(Object obj) {
        this.obj = obj;
    }


}
